package com.oocl.crm.run;

import com.oocl.crm.controller.impl.ControllerImpl;
import com.oocl.crm.customer.Customer;
import com.oocl.crm.db.MyLinkedList;
import com.oocl.crm.db.MyLinkedListFactory;
import com.oocl.crm.util.FormatPrinter;

public class Run {
	static void run(){
		MyLinkedList<Customer> dB = new MyLinkedList<Customer>();
		dB.addNode(new Customer("08", "Mike", "male", "Shanghai", "19970701", "123456"));
		dB.addNode(new Customer("03", "John", "male", "Beijing", "19960701", "123456"));
		dB.addNode(new Customer("01", "Jack", "male", "Shanghai", "19950701", "123456"));
		dB.addNode(new Customer("05", "Amy", "female", "Shanghai", "19930201", "123456"));
		dB.addNode(new Customer("04", "Sarah", "female", "Guangdong", "19990701", "555"));
		dB.addNode(new Customer("07", "Lucy", "female", "Guangdong", "19930701", "987"));
		dB.addNode(new Customer("02", "Tom", "male", "Chengdu", "19970701", "555"));
		dB.addNode(new Customer("06", "Lily", "female", "Kunming", "19920701", "4321"));
		dB.addNode(new Customer("10", "Max", "male", "Shenzhen", "19910701", "555"));
		dB.addNode(new Customer("09", "White", "male", "Kunming", "19950701", "999"));
		ControllerImpl contr =new ControllerImpl(dB);
		FormatPrinter.printHelpDoc("H", null);
		while(contr.commandProcess(null, null)){}
		System.out.println("GOOD BYE!");
	}
	
	public static void main(String[] args) {
		run();
	}
	
}
